package com.scala.oop.classDemo

/**
 * Created by Administrator on 2018/1/27/027.
 */
object InnerClassDemoTest {
  def main(args: Array[String]) {

    val c1 = new InnerClassDemo
    val s1 = c1.getStudent("leo")
    c1.students += s1

    for(i <- c1.students){
      println(i.name)
    }
    val c2 = new InnerClassDemo
    val s2 = c2.getStudent("leo")

   //  c1.students += s2  //这里内部类的实例不能直接放入

  }
}
